﻿<?php
    header("Content-type: text/xml\n\n");
	
	$site=$_GET['site'];
    $variable=$_GET['variable'];
	$startDate=$_GET['startdate'];
	$endDate=$_GET['enddate'];
	
	$url=$_GET['url'];
	
	//$url = "http://icewater.usu.edu/littlebearriver/cuahsi_1_0.asmx?WSDL";
	//$site='LBR:USU-LBR-Mendon';
	//$variable = 'LBR:USU3';
	//$startDate = '2010-10-01';
	//$endDate = '2011-10-01';
	
	$client = new SoapClient($url);
	$arr = (array) null;
	$authToken = '';
	
	
	
	
	
	$param = array('location'=>$site, 
					'variable'=>$variable, 
					'startDate'=>$startDate, 
					'endDate'=>$endDate, 
					'authToken'=>$authToken);
	

	$result = $client->GetValues($param);
	$getValuesResult = $result->GetValuesResult;
  
	echo($getValuesResult);
  
?>